(function (window) {
 "use strict";

 function HangoutDemo(){
 console.log("Starting...");
 gapi.hangout.onApiRead.add(this.onApiReady.bind(this)); //Add Callback
 }	
  		
  HangoutDemo.prototype.onApiReady = function (event) {
    if(event.isApiReady === true){
	console.log("API Ready");
	//start doing stuff here
	}
  }
  
}(window));